﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainingWorkshop.DAL_EF.Translator
{
   public  class StudentTranslator
    {
        /// <summary>
        /// Convert EF_Student list  in to Model_Student List
        /// </summary>
        /// <param name="inputList">EF Student List</param>
        /// <returns>Model Student List</returns>
        public static List<Model.Student> EFToModelStudent(List<Student> inputList)
        {

            List<Model.Student> StudentList = new List<Model.Student>();
            foreach (Student t in inputList)
            {
                Model.Student Student = new Model.Student();
                Student.StudentId = t.StudentId;
                Student.StudentName = t.StudentName;
                Student.StudentGender = t.StudentGender;
                Student.ClassId = t.ClassId;
                StudentList.Add(Student);
            }
            return StudentList;

        }
    }
}
